<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>XenC: Similarity Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">XenC
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Open-source tool for data selection in NLP</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_similarity-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Similarity Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class taking care of all the similarity measure computations.  
 <a href="class_similarity.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="similarity_8h_source.html">similarity.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7078873572634cffa61d35021999845e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_similarity.html#a7078873572634cffa61d35021999845e">Similarity</a> ()</td></tr>
<tr class="memdesc:a7078873572634cffa61d35021999845e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#a7078873572634cffa61d35021999845e">More...</a><br /></td></tr>
<tr class="separator:a7078873572634cffa61d35021999845e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93982eae85d761f9261af5e42ad5f2d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_similarity.html#a93982eae85d761f9261af5e42ad5f2d6">initialize</a> (boost::shared_ptr&lt; <a class="el" href="class_corpus.html">Corpus</a> &gt; ptrInCorp, boost::shared_ptr&lt; <a class="el" href="class_corpus.html">Corpus</a> &gt; ptrOutCorp, boost::shared_ptr&lt; <a class="el" href="class_xen_vocab.html">XenVocab</a> &gt; ptrVocab)</td></tr>
<tr class="memdesc:a93982eae85d761f9261af5e42ad5f2d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialization function from two <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a> (in and out-of-domain) and a vocabulary (<a class="el" href="class_xen_vocab.html" title="Class handling a XenC vocabulary. ">XenVocab</a>)  <a href="#a93982eae85d761f9261af5e42ad5f2d6">More...</a><br /></td></tr>
<tr class="separator:a93982eae85d761f9261af5e42ad5f2d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dca03d567602f99f7c72fdafe3a3736"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_similarity.html#a9dca03d567602f99f7c72fdafe3a3736">~Similarity</a> ()</td></tr>
<tr class="memdesc:a9dca03d567602f99f7c72fdafe3a3736"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor.  <a href="#a9dca03d567602f99f7c72fdafe3a3736">More...</a><br /></td></tr>
<tr class="separator:a9dca03d567602f99f7c72fdafe3a3736"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef8968faf9f8d877eae92984400de13c"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_similarity.html#aef8968faf9f8d877eae92984400de13c">getSim</a> (int n)</td></tr>
<tr class="memdesc:aef8968faf9f8d877eae92984400de13c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor to the nth sentence similarity measure.  <a href="#aef8968faf9f8d877eae92984400de13c">More...</a><br /></td></tr>
<tr class="separator:aef8968faf9f8d877eae92984400de13c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f3571ed28243447a475876a416ebc31"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_similarity.html#a1f3571ed28243447a475876a416ebc31">getSize</a> () const </td></tr>
<tr class="memdesc:a1f3571ed28243447a475876a416ebc31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accessor to the size of the similarity map.  <a href="#a1f3571ed28243447a475876a416ebc31">More...</a><br /></td></tr>
<tr class="separator:a1f3571ed28243447a475876a416ebc31"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class taking care of all the similarity measure computations. </p>
<p>This class computes similarity scores between two <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a> given a vocabulary. It determines the optimal vector for both <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a>, and uses it for similarity computation. WARNING: this feature is still experimental </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7078873572634cffa61d35021999845e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Similarity::Similarity </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>

</div>
</div>
<a class="anchor" id="a9dca03d567602f99f7c72fdafe3a3736"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Similarity::~Similarity </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default destructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aef8968faf9f8d877eae92984400de13c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float Similarity::getSim </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accessor to the nth sentence similarity measure. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">n</td><td>: integer representing the number of the sentence </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>float representing the similarity measure of the nth sentence </dd></dl>

</div>
</div>
<a class="anchor" id="a1f3571ed28243447a475876a416ebc31"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Similarity::getSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accessor to the size of the similarity map. </p>
<dl class="section return"><dt>Returns</dt><dd>unsigned int representing the size </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_similarity_a1f3571ed28243447a475876a416ebc31_cgraph.png" border="0" usemap="#class_similarity_a1f3571ed28243447a475876a416ebc31_cgraph" alt=""/></div>
<map name="class_similarity_a1f3571ed28243447a475876a416ebc31_cgraph" id="class_similarity_a1f3571ed28243447a475876a416ebc31_cgraph">
<area shape="rect" id="node2" href="class_xen_option.html#a97ad096aee729b4d8ae993b1381d4eec" title="Accessor to the instance of the singleton XenOption object. " alt="" coords="181,5,341,31"/>
<area shape="rect" id="node3" href="namespace_xen_common.html#ac5d0528153fa3cb1a068e8eb37f8762e" title="Template flipping a multimap with descending order keys with values. " alt="" coords="182,55,339,80"/>
<area shape="rect" id="node4" href="class_xen_option.html#a8f60152e83d018aa39c9260aa08528dd" title="Accessor to the similarity measures vector size. " alt="" coords="182,104,340,129"/>
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a93982eae85d761f9261af5e42ad5f2d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Similarity::initialize </td>
          <td>(</td>
          <td class="paramtype">boost::shared_ptr&lt; <a class="el" href="class_corpus.html">Corpus</a> &gt;&#160;</td>
          <td class="paramname"><em>ptrInCorp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">boost::shared_ptr&lt; <a class="el" href="class_corpus.html">Corpus</a> &gt;&#160;</td>
          <td class="paramname"><em>ptrOutCorp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">boost::shared_ptr&lt; <a class="el" href="class_xen_vocab.html">XenVocab</a> &gt;&#160;</td>
          <td class="paramname"><em>ptrVocab</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialization function from two <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a> (in and out-of-domain) and a vocabulary (<a class="el" href="class_xen_vocab.html" title="Class handling a XenC vocabulary. ">XenVocab</a>) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ptrInCorp</td><td>: shared pointer on the in-domain <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a> </td></tr>
    <tr><td class="paramname">ptrOutCorp</td><td>: shared pointer on the out-of-domain <a class="el" href="class_corpus.html" title="Corpus-related functionalities. ">Corpus</a> </td></tr>
    <tr><td class="paramname">ptrVocab</td><td>: shared pointer on the common <a class="el" href="class_xen_vocab.html" title="Class handling a XenC vocabulary. ">XenVocab</a> (usually the in-domain one) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/<a class="el" href="similarity_8h_source.html">similarity.h</a></li>
<li>src/<a class="el" href="similarity_8cpp.html">similarity.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 18 2016 17:22:37 for XenC by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
